package cn.yuanqiao.archive.appManager.domain;/**
 * @author 赵常飞
 * @date 2024/1/25 15:45
 */

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 *@Author: 赵常飞
 *@Date: 2024/1/25 15:45
 *@Description:
 *@Note:
 */

public class TenantGdfwAndBgqx  extends BaseEntity {
    private final String BIGTABLENAME = "_GDFWANDBGQX";

    public TenantGdfwAndBgqx() {
        String tenantCode = SecurityUtils.getLoginUser().getSysUser().getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }
    private static final long serialVersionUID = 1L;
    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** 主键 */

    private Long id;

    /** 父节点id */
    @Excel(name = "父节点id")
    private Long parentId;

    @NotNull(message = "请输入门类id")
    private Long categoryId;

    /** 名称 */
    @NotNull(message = "请输入名称")
    @Excel(name = "名称")
    private String name;

    @NotNull(message = "请选择保管期限")
    @Excel(name = "保管期限")
    private String bgqx;



    /** 排序 */
    @Excel(name = "排序")
    private Integer orderNo;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 删除 */
    @Excel(name = "删除")
    private Integer isDel;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private Long creatorId;

    /** 创建人 */
    @Excel(name = "创建人")
    private String creator;

    /** 创建人ID */
    @Excel(name = "修改人ID")
    private Long updaterId;

    /** 创建人 */
    @Excel(name = "修改人")
    private String updater;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private Date createTime;

    /** 创建时间 */
    @Excel(name = "修改时间")
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public Long getCategoryId() {
        return categoryId;
    }

    @Override
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }



    public String getBgqx() {
        return bgqx;
    }

    public void setBgqx(String bgqx) {
        this.bgqx = bgqx;
    }

    public Integer getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }



    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }


    public Long getUpdaterId() {
        return updaterId;
    }

    public void setUpdaterId(Long updaterId) {
        this.updaterId = updaterId;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Override
    public String toString() {
        return "TenantGdfwAndBgqx{" +
                "BIGTABLENAME='" + BIGTABLENAME + '\'' +
                ", tableName='" + tableName + '\'' +
                ", id=" + id +
                ", parentId=" + parentId +
                ", categoryId=" + categoryId +
                ", name='" + name + '\'' +
                ", bgqx='" + bgqx + '\'' +
                ", orderNo=" + orderNo +
                ", remark='" + remark + '\'' +
                ", isDel=" + isDel +
                ", creatorId=" + creatorId +
                ", creator='" + creator + '\'' +
                ", updaterId=" + updaterId +
                ", updater='" + updater + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
